import net.diegogama.dgvendas.HibernateUtil;

import org.apache.catalina.Session;
import org.hibernate.SessionFactory;


public class Conecta {

	public static void main(String[] args){
		Session sessao = null;
		try{
			sessao = (Session) HibernateUtil.getSession().openSession();
			System.out.println("Conectou !");
		}finally{
			((SessionFactory) sessao).close();
			System.out.println("Fechou !");
			
		}
	}
}
